/*
 * IBM Corporation.
 * Copyright (c) 2014 All Rights Reserved.
 */

package com.ibm.iisp.dataie.vo;

import java.util.List;
import java.util.Map;

/**
 * 类作用：数据导出请求所需要的信息
 * 
 * @author Johnny@cn.ibm.com 使用说明：
 */
public class DataExportRequest {
	public static class ColumnDef {
		private String name;
		/**
		 * 字段中文名
		 */
		private String desc;
		/**
		 * 是否键值（键值必有导出）
		 */
		private Boolean isRequired;
		/**
		 * 是否要导出
		 */
		private Boolean isExport;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public Boolean getIsRequired() {
			return isRequired;
		}

		public void setIsRequired(Boolean isRequired) {
			this.isRequired = isRequired;
		}

		public Boolean getIsExport() {
			return isExport;
		}

		public void setIsExport(Boolean isExport) {
			this.isExport = isExport;
		}

	}

	private String tableName;

	/**
	 * 下载的文件名
	 */
	private String fileName;
	/**
	 * 模板ID. 不指定ID则会根据表名去查找最新的模板
	 */
	private Long templateId;
	/**
	 * 是否导出到模板
	 */
	private boolean useTemplate = true;
	/**
	 * 指定数据sheet序号
	 */
	private Integer sheetIdx;

	/**
	 * 要导出的列名（仅在无模板时有效）
	 */
	private List<ColumnDef> columns;

	/**
	 * 过滤条件中的参数值，如过滤条件为
	 */
	private Map<String, Object> filterParams;
	/**
	 * 数据导出时的过滤条件，如：DATA_DATE='20160330'
	 */
	private String filter;

	/**
	 * 缺省是否只导出增量数据
	 */
	private Boolean isExportIncOnly;

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public List<ColumnDef> getColumns() {
		return columns;
	}

	public void setColumns(List<ColumnDef> columns) {
		this.columns = columns;
	}

	public String getFilter() {
		return filter;
	}

	public void setFilter(String filter) {
		this.filter = filter;
	}

	public Long getTemplateId() {
		return templateId;
	}

	public void setTemplateId(Long templateId) {
		this.templateId = templateId;
	}

	public boolean isUseTemplate() {
		return useTemplate;
	}

	public void setUseTemplate(boolean useTemplate) {
		this.useTemplate = useTemplate;
	}

	public Integer getSheetIdx() {
		return sheetIdx;
	}

	public void setSheetIdx(Integer sheetIdx) {
		this.sheetIdx = sheetIdx;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public Boolean getIsExportIncOnly() {
		return isExportIncOnly;
	}

	public void setIsExportIncOnly(Boolean isExportIncOnly) {
		this.isExportIncOnly = isExportIncOnly;
	}

	public Map<String, Object> getFilterParams() {
		return filterParams;
	}

	public void setFilterParams(Map<String, Object> filterParams) {
		this.filterParams = filterParams;
	}

}
